package com.zhangsun.springRabbitMq.config;

import com.zhangsun.springRabbitMq.common.RabbitMqDirectConstant;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Direct模式消息队列
 */
@Configuration
public class RabbitMqDirectConfig {

    /**
     * 消息队列
     *
     * @return 队列
     */
    @Bean
    public Queue helloQueue() {
        return new Queue(RabbitMqDirectConstant.QUEUE_HELLO);
    }

}
